home *** CD-ROM | disk | FTP | other *** search
- #include <conio.h>
- #include <stdio.h>
- #include <alloc.h>
-
- #include "geom.h"
-
- // Heap check system
- void report (char * s, rect r) // heap report functions - not necessary
- { // but usefull
- directvideo=0;
- cprintf("%s (%d,%d,%d,%d)",s,r.left(),r.top(),r.right(),r.bottom());
- }
- unsigned long cl0;
-
- void heapstart() // the simple heap test system
- { // reports about heap before and after execution
- cl0=coreleft(); // not strongly necessary
- }
-
- void heapexit()
- {
- cprintf("before:%lu,after:%lu\r\nheapcheck:%d\r\n",cl0,coreleft(),
- heapcheck());
- }
-
- #pragma startup heapstart 200
- #pragma exit heapexit 200
-
- typedef void *(*malloc_ptr)(unsigned);
- typedef void (*farfree_ptr)(void far *);
- malloc_ptr mp=malloc;
- farfree_ptr ffp=farfree;
-
-